home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
STRINGS
/
STRCODE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-08-09
|
1KB
|
33 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; string coding
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBINI, EFLIBTXT, CRT;
var StringCode : StringCodeObjectType;
MyString : string;
begin
with StringCode do begin
{ Initialize string code object with address of a text string }
Initialize (@MyString);
MyString := '@Yellow:Green@-=> String coding technology makes text formatting ' +
'easy.@C@ <=-';
{ Change attribute if string contains color codes }
if IsColored then TextAttr := StringCode.Attribute;
{ Write formatted string }
Write (TextFormatted(79));
{ Restore previois attribute }
TextAttr := 7; WriteLn;
Intercept;
end;
end.